package com.weilele.mvvm.widget

import android.content.Context
import android.util.AttributeSet
import android.view.ViewGroup

abstract class BaseViewGroup : ViewGroup {
    constructor(context: Context?) : super(context)
    constructor(context: Context?, attrs: AttributeSet?) : super(context, attrs)
    constructor(context: Context?, attrs: AttributeSet?, defStyleAttr: Int) : super(context, attrs, defStyleAttr)
    constructor(context: Context?, attrs: AttributeSet?, defStyleAttr: Int, defStyleRes: Int) : super(context, attrs, defStyleAttr, defStyleRes)


    //1.MeasureSpec.UNSPECIFIED -> 未指定尺寸
    //2、MeasureSpec.EXACTLA -> 精确尺寸，控件的宽高指定大小或者为FILL_PARENT
    //3、MeasureSpec.AT_MOST -> 最大尺寸，控件的宽高为WRAP_CONTENT，控件大小一般随着控件的子空间或内容进行变化，此时控件尺寸只要不超过父控件允许的最大尺寸
    //val widthMode = MeasureSpec.getMode(widthMeasureSpec)
    //val heightMode = MeasureSpec.getMode(heightMeasureSpec)
    //val widthSize = MeasureSpec.getSize(widthMeasureSpec)
    //val heightSize = MeasureSpec.getSize(heightMeasureSpec)
    override fun onMeasure(widthMeasureSpec: Int, heightMeasureSpec: Int) {
        super.onMeasure(widthMeasureSpec, heightMeasureSpec)
    }
}